<div class="zs-body" data-ng-init="formInit('knowledge', {
		keyField:'id',
		randomFields:['id'],
		queryFields:'title,column,subject,publishDate,release,author,state',
		orderObject:{id:0} 
	}) && loadData('knowledge');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a >首页</a>
			<i class="right-arr"></i>
			<a >知识库</a>
        </div>
        <div class="option">
        	<input type="button" class="zs-btn orange" value="新建"
				ng-click="addOpen()" />
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input1"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit1')"/>
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input2"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit2')"/>
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input3"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit3')"/>
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input4"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit4')"/>
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input5"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit5')"/>
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input6"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit6')"/>
			<input type="button" class="zs-btn orange" value="编辑" ng-show="input7"
				ng-click="editRow('knowledge', knowledge.sRows[0]) && openWindow('edit7')"/>
			<input type="button" class="zs-btn orange" value="删除 " 
				ng-click="delEntitys('knowledge')"/>
        </div>
    </div>
    <div class="zs-tree">
        <div class="zs-nice-tab idTabs">
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper" style="width:230px">
                    <ag-Combotree class="zs-input" style="width:230px;height: 28px" 
                    	placeholder="所属站点"
						para="{ uDictionary:true,
								dictionary:'knowledge_site',
								pidField:'pid',
        						leafField:'leaf'}"
						ng-model="e"/>
                </span>
            </div>
        </div>
        <div style="margin-left: 15px;margin-top: 15px;margin-right: 15px;">
			<ag-Tree
				para="{ uDictionary:true,
					dictionary:'knowledge_catalog',
					checkbox:false,
					pidField:'pid',
					leafField:'leaf',
					intLoadLevel:2}"
				onselect="knowledgeOrgSearch"
				ng-model='o'/>
        </div>
    </div>
    <div class="zs-content withTree" style="position:unset">
        <div class="zs-nice-tab idTabs">
        	<div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" placeholder="标题" class="zs-input" ng-model="knowledge.queryObject['title:like']"/>
                </span>
            </div>
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" placeholder="发布人" class="zs-input" ng-model="knowledge.queryObject['title:like']"/>
                </span>
            </div>
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" placeholder="作者" class="zs-input" ng-model="knowledge.queryObject['title:like']"/>
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('knowledge')"></a>
                <a class="ope-2"></a>
            </div>
        </div>
        <div class="zs-itab" style="margin:0px 10px">
			<div class="zs-itab-title">
				<ul class="idTabs">
					<li><a class="selected">所有标签</a></li>
					<li><a >方案</a></li>
					<li><a >需求</a></li>
					<li><a >概要设计</a></li>
					<li><a >详细设计</a></li>
					<li><a >数据库设计</a></li>
				</ul>
			</div>
		</div>
        
        <div class="zs-data-table">
            <div class="container">
                <table>
                    <thead>
	                    <tr>
	                        <th>
	                        	<input id="allCheckbox" type="checkbox"
	                        		ng-click="selectAll('knowledge','allCheckbox');">
	                        </th>
	                        <th>标题</th>
	                        <th>发布信息</th>
	                        <th>状态</th>
	                    </tr>
	                </thead>
	                <tbody>
	                    <tr ng-repeat="r in knowledge.datas">
			                <td>
			                	<input type="checkbox"
				                    ng-click="selectRow('knowledge',r);"
				                    ng-model="r.selected" />
			                </td>
			                <td>
			                    <a ng-click="editRow('knowledge',r) && openWindow('edit');">
			                        <label ng-bind="r.title"></label><br/>
			                        [<label ng-bind="r.siteName"></label>]-[<label ng-bind="r.columnName"></label>]-[<label ng-bind="r.subjectName"></label>]
			                    </a>
			                </td>
			                <td>
			                    <a ng-click="editRow('knowledge',r) && openWindow('edit');">
			                        时间:<label ng-bind="r.publishDate"></label><br/>
			                        发布人:<label ng-bind="r.release"></label> - 作者:<label ng-bind="r.author"></label>
			                    </a>
			                </td>
			                <td>
			                    <a ng-click="editRow('knowledge',r) && openWindow('edit');">
			                        <label ng-bind="r.stateName"></label>
			                    </a>
			                </td>
			            </tr>
	                </tbody>
                </table>
            </div>
        </div>
        <div class="zs-pagination-box">
            <ag-Page fn='knowledge'></ag-Page>
        </div>
            
        <div ag-Window id="edit1" title="知识库编辑" width='1100px' height='430px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form" novalidate>
				    <table width="100%">
				        <tbody>
				        	<tr>
		                        <td class="text" width="20%">栏目</td>
		                        <td class="left" width="30%"><input type="text"
		                            ng-model="knowledge.editRow.column"
		                            class="zs-input" required></td>
		                        <td class="text" width="20%">专题</td>
		                        <td class="left" width="30%"><input type="text"
		                            ng-model="knowledge.editRow.subject"
		                            class="zs-input" required></td>
		                    </tr>
		                    <tr>
		                        <td class="text" width="20%">*标题</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="knowledge.editRow.title"></td>
		                    </tr>
		                    <tr>
		                        <td class="text" width="20%">完整标题</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="knowledge.editRow.fullTitle"></td>
		                    </tr>
		                    <tr>
		                    	<td class="text" width="20%">关键词</td>
		                        <td class="left" width="30%"><input type="text"
		                            class="zs-input" ng-model="knowledge.editRow.main">
		                        </td>
		                        <td class="text" width="20%"></td>
		                        <td class="left" width="30%">
		                        	<input type="checkbox" ng-model="knowledge.editRow.valid"
		                        		ng-true-value="true" ng-false-value="false" value='false' />
		                        	有效 
		                        	<input type="checkbox" ng-model="knowledge.editRow.leaf"
		                        		ng-true-value="true" ng-false-value="false" value='false' />
		                        	子节点
		                        </td>
		                    </tr>
	                     	<tr>
		                        <td class="text" width="20%">描述</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="knowledge.editRow.describe"></td>
		                    </tr>
                            <tr>
		                        <td class="text" width="20%">来源</td>
		                        <td class="left" width="30%"><input type="text"
		                            ng-model="knowledge.editRow.source"
		                            class="zs-input" required></td>
		                        <td class="text" width="20%">作者</td>
		                        <td class="left" width="30%"><input type="text"
		                            ng-model="knowledge.editRow.author"
		                            class="zs-input" required></td>
		                    </tr>
                         	<tr>
		                        <td class="text" width="20%">标题图</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="knowledge.editRow.titlePicture"></td>
		                    </tr>
	                     	<tr>
		                        <td class="text" width="20%">正文</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="knowledge.editRow.text"></td>
		                    </tr>
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="4">
				                    <input type="button" name="ok" value="保存" class="zs-btn c-red"
				                    	ng-click="formValidate(form) && save('knowledge', knowledge.editRow, saveCloseWindow)"/>
				                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit1')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>
    </div>
</div>